# -*- encoding=utf8 -*-
        
__author__ = "Bryan.Chen"
__desc__=""
        
from airtest.core.api import *
        
auto_setup(__file__)
        
from poco.drivers.std import StdPoco
poco = StdPoco()
        
using("../FlowTest.air")
import FlowTest
        
class SideMenu_Open(FlowTest.BaseTestCase):
    def __init__(self):
        print("%s __init__" % (__file__))
        
    def runTest(self, args):
        print("%s runTest" % (__file__))
        # 获取顶部节点
        topPanel = poco("top_panel")
        if not topPanel.exists():
            return False
        # 获取头像按钮
        btnHead = topPanel.offspring("head_btn")
        if not btnHead.exists():
            return False
        # 点击头像
        self.clickButton(btnHead) 

        try:
            # 等待左侧菜单出现，超时120s
            poco("bottom_panel").wait_for_appearance()
        except:
            assert_equal(False, True, "大厅左侧菜单弹出正常")
            return False

        return True
        
_instance = SideMenu_Open()
runTest = _instance.runTest